package cn.befory.service;

import cn.befory.pojo.Perm;
import cn.befory.service.vo.Menu;

import java.util.List;

/**
 * Created by befory on 2019/10/14.
 */
public interface PermService {
    /**
     * 获取菜单
     * @param uid 用户id
     * @return 菜单集合
     * @throws Exception e
     */
    List<Menu> getMenus(Long uid) throws Exception;

    /**
     * 获取菜单
     * @param uid 用户id
     * @param param all 获取所有菜单  parent 获取父级菜单
     * @return 菜单集合
     * @throws Exception e
     */
    List<Perm> getMenus(Long uid,String param) throws Exception;

    /**
     * 添加权限
     * @param perm 权限对象
     * @return true or false
     * @throws Exception e
     */
    boolean addPerm(Perm perm) throws Exception;
}
